package com.frame.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.mini.core.WeakEntity;
import com.mini.core.annotation.Column;
import com.mini.core.annotation.Entity;
import com.mini.core.utils.EnumClazz.StrategyType;

/**
 * @author sxjun
 * @version 2016-3-11
 */
@Entity(table="Users",id="ID",strategy=StrategyType.UUID)
public class User extends WeakEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
    /**
	 * Columns
	 */
	public static final class Columns {
		public static final String id = "ID";
		public static final String username = "USERNAME";
		public static final String password = "PASSWORD";
		public static final String active = "ACTIVE";
		public static final String email = "EMAIL";
		public static final String createtime = "CREATETIME";
		public static final String roleid = "ROLEID";
		public static final String deptid = "DEPTID";
	}

	/**
	 * Primary key
	 * @return
	 */
	@Column("id")
    public String getId() {
    	return super.getStr(Columns.id);
	}

    /**
	 * Primary key
	 * @param id
	 * @return
	 */
	public User setId(String id) {
		super.set(Columns.id, id);
		return this;
	}

	/**
	 * Get the createtime
	 * @return
	 */
	@Column("createtime")
	public Date getCreatetime() {
		return super.getDate(Columns.createtime);
	}

	/**
	 * set the createtime
	 * @param createtime
	 * @return
	 */
	public User setCreatetime(Date createtime) {
		super.set(Columns.createtime, createtime);
		return this;
	}

	/**
	 * Get the email of the user
	 * @return
	 */
	@Column("email")
	public String getEmail() {
		return super.getStr(Columns.email);
	}

	/**
	 * Set the email of the user
	 * @param email
	 * @return
	 */
	public User setEmail(String email) {
		super.set(Columns.email, email);
		return this;
	}

	/**
	 * Get the name of user
	 * @return
	 */
	@Column("username")
	public String getUsername() {
		return super.getStr(Columns.username);
	}

	/**
	 * Set the name of user
	 * @param username
	 * @return
	 */
	public User setUsername(String username) {
		super.set(Columns.username,username);
		return this;
	}

	/**
	 * Get active status of user
	 * @return
	 */
	@Column("active")
	public Boolean getActive() {
		return super.getBoolean(Columns.active);
	}

	/**
	 * Set active status of user
	 * @param active
	 * @return
	 */
	public User setActive(Boolean active) {
		super.set(Columns.active,active);
		return this;
	}

	/**
	 * Get the password of user
	 * @return
	 */
	@Column("password")
	public String getPassword() {
		return super.getStr(Columns.password);
	}

	/**
	 * Set the password of user
	 * @param password
	 * @return
	 */
	public User setPassword(String password) {
		super.set(Columns.password,password);
		return this;
	}

	/**
	 * Get the role id of user
	 * @return
	 */
	@Column("roleid")
	public String getRoleid() {
		return super.getStr(Columns.roleid);
	}

	/**
	 * Set the role id of user
	 * @param roleid
	 */
	public User setRoleid(String roleid) {
		super.set(Columns.roleid,roleid);
		return this;
	}
	
	/**
	 * Get the department id of user
	 * @return
	 */
	@Column("roleid")
	public String getDeptid() {
		return super.getStr(Columns.deptid);
	}

	/**
	 * Set the department id of user
	 * @param deptid
	 */
	public User setDeptid(String deptid) {
		super.set(Columns.deptid,deptid);
		return this;
	}

}
